{{ define "right" }}
<div class="right-side">
    <div class="consult-box">
        <div class="title">
            <h3>免费领取体验课</h3>
        </div>
        <div class="form-area">
            <form action="" method="post" class="mt30" onsubmit="return yuyue();">
                <div class="con-form_group">
                    <input type="text" placeholder="孩子姓名" id="child_name" class="" name="child_name" maxlength="11" />
                    <span class="item-text"  style="display: none;">请补全信息</span></div>
                <div class="con-form_group">
                    <input type="text" placeholder="孩子年龄" id="child_age" class="" name="child_age" maxlength="11" />
                    <span class="item-text"  style="display: none;">请补全信息</span></div>
                <div class="con-form_group">
                    <input type="text" placeholder="家长联系手机" id="telphone" class="" name="telphone" maxlength="11" />
                    <span class="item-text"  style="display: none;">请补全信息</span></div>
                <div class="con-form_group">
                    <input type="text" placeholder="请输入验证码" id="code" class="new_login" name="code" />
                    <a onclick="sendCode();" style="cursor:pointer" class="btn-verifyCode">获取验证码</a>
                    <span class="item-text" style="display: none;">请补全信息</span></div>
                <div class="con-form-btn">
                    <input type="submit" class="flig_bg1"  style="cursor:pointer;" value="立即预约" />
                    </input>
                    <!--<a class="flig_bg1" href="javascript:;" onClick="doQuickRegister();">立即注册</a>-->
                </div>
            </form>
        </div>
    </div>
    <div class="contentMod mt20">
        <div class="mod-hdtit-1">
            <h2 class="tit">GICE新闻</h2>
        </div>
        <div class="bd mt10">
            <ul class="hdlist_01">
                {{range $k,$v := .reports}}
                    <li>
                        <img src="{{.Thumbnail}}" alt="{{.Title}}" width="320" height="170" />
                    </li>
                {{end}}
                <div class="clear"></div>
            </ul>
        </div>
        <div class="bd"></div>
    </div>
    <div class="contentMod mt20">
        <div class="mod-hdtit-1">
            <h2 class="tit">GICE活动</h2>
        </div>
        <div class="bd">
            <ul class="picTxtList-03 splitLine">
                {{range $k,$v := .actives}}
                    <li> <a href="/activeDetail?id={{.Id}}" target="_blank"><img width="372" height="233" alt="{{.Title}}" src="{{.Thumbnail}}" /></a>
                        <p><a href="#" target="_blank">{{.Title}}</a> <span>{{.UpdateTime}}</span></p>
                    </li>
                {{end}}
            </ul>
        </div>
        <div class="bd"></div>
    </div>
</div>
<script src="/static/layer/layer.js"></script>
<script>
    function yuyue() {
        var child_name = $("#child_name").val();
        if(child_name == "") {
            layer.alert('请输入孩子姓名');
            return false;
        }
        var child_age = $("#child_age").val();
        if(child_age == "") {
            layer.alert('请输入孩子年龄');
            return false;
        }
        var telphone = $("#telphone").val();
        if(telphone == "") {
            layer.alert('请输入手机号');
            return false;
        }
        var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
        if(!myreg.test(telphone)){
            layer.alert('请输入正确的手机号');
            return false;
        }
        var code = $("#code").val();
        if(code == "") {
            layer.alert('请输入验证码');
            return false;
        }

        return false;
    }
    //发送验证码
    function sendCode() {
        var telphone = $("#telphone").val();
        if(telphone == "") {
            layer.alert('请输入手机号');
            return false;
        }
        var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
        if(!myreg.test(telphone)){
            layer.alert('请输入正确的手机号');
            return false;
        }
        //发送验证码
        $.ajax({
            url:"/code",
            data:"phone="+telphone,
            dataType:"json",
            type:"post",
            beforeSend:function(){

            },
            success:function(result){

            }
        });
        return false;
    }
</script>
{{ end }}